@extends('admin.layout.basic')
@section('content')
        <!-- 面包屑 -->
@include('admin.layout.breadcrumb')
<div class="wrapper wrapper-content animated fadeInUp">


    <div class="row">



      <div class="col-lg-6">
        <div class="ibox ">
          <div class="ibox-title">
            <h5>分类列表</h5>
          </div>
          <div class="ibox-content">

            <p class="m-b-lg">
              拖拽分类.可以重新设置展示顺序
            </p>

            <div class="dd" id="nestable">

            </div>
            <div class="m-t-md">

            </div>

            <div class="form-group">
              <div class="  text-center">
                <button type="button" onclick="admin_category_list.saveSortedCategory()" class="btn btn-w-m btn-success">更新</button>
              </div>
            </div>
          </div>
        </div>
      </div>


      <div class="col-lg-6">
        <div class="ibox ">
          <div class="ibox-title">
            <h5>分类编辑</h5>
          </div>
          <div class="ibox-content"  >

            <form method="get" id="categoryform" class="form-horizontal">

              <input type="hidden" name="id" id="id">
              <input type="hidden" name="parent_id" id="parent_id">

              <div class="form-group">
                <div class="col-sm-8 col-sm-offset-2">
                  <div id="com_message"  name="com_message"  class="text-danger text-center" >
                  </div>
                </div>
              </div>

              <div class="form-group">
                <label class="col-sm-2 control-label">{{trans("admin/message.category_name")}}</label>
                <div class="col-sm-10"><input type="text" name="name" class="form-control"></div>
              </div>

              <div class="hr-line-dashed"></div>
              <div class="form-group"><label class="col-sm-2 control-label">{{trans("admin/message.category_parent")}}</label>
                <div class="col-sm-8">
                  <input type="text" id="parent_name" disabled name="parent_name" class="form-control">
                </div>
                <button type="button" onclick="admin_category_list.openModel()" class="btn btn-success">{{trans("admin/message.chose")}}</button>
              </div>

              <div class="hr-line-dashed"></div>
              <div class="form-group"><label class="col-sm-2 control-label">{{trans("admin/message.category_desc")}}</label>
                <div class="col-sm-10"><textarea  class="form-control" name="desc"></textarea> </div>
              </div>


              <div class="hr-line-dashed"></div>
              <div class="form-group">
                <div class="  text-center">
                  <button type="button" onclick="admin_category_list.submitCategory()" class="btn btn-w-m btn-success">{{ trans('admin/message.add') }}</button>
                  <button type="button" onclick="admin_category_list.resetCategory()"  class="btn btn-w-m btn-warning">{{ trans('admin/message.reset') }}</button>
                </div>
              </div>
            </form>

          </div>

        </div>
      </div>

      @include("admin.common.categorySelect")


    </div>
</div>
@endsection


